home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / Moscow ML 1.42 / README.Mac < prev    next >
Encoding:
Text File  |  1997-07-29  |  25.8 KB  |  638 lines  |  [TEXT/Moml]

  1. 1997Jul25   e
  2.  
  3. Moscow ML for the Apple Macintosh™
  4.  
  5. mosml is a port of Moscow ML 1.42 to the Apple Macintosh.
  6. It was done by e (Doug Currie) in mid-July 1997 based on my previous ports.
  7.  
  8. Read This if Nothing Else
  9. -------------------------
  10.  
  11. Typing an expression followed by the Enter key (or Option-Return), causes 
  12. the expression to be sent to mosml for evaluation. Try typing:
  13.   help "lib";
  14. followed by Enter.
  15.  
  16. There are two applications sets, identical in function, but customized 
  17. for the PPC and m68k SANE. If you are not using Moscow ML on a PowerMac, 
  18. you should put the PowerMac apps in the trash, and extract (by double 
  19. clicking the .sea file) the 68k applications for your machine. You must 
  20. have a PowerMac, or Quadra, or a M68030 or M68020 based Mac. For a 
  21. PowerMac, use the PPC versions. otherwise use the SANE version.
  22.  
  23. See MacReleaseNotes.txt for improvements since version 1.31.
  24.  
  25. Credits/Support
  26. ---------------
  27.  
  28. mosml is freeware. The entire source code for mosml is available.
  29. A number of authors have contributed to its development; see the file 
  30. copyrght/copyrght.cl for restrictions on charging money for distribution 
  31. of this software.
  32.  
  33. I have tested mosml on a PowerMac (StarMax 4200) and, very briefly, on a Mac 
  34. IIfx. I have not extensively stress tested memory requirements. I usually run 
  35. with 8M allocated to mosml, but it will probably run with much less. It will 
  36. launch and open files in 1M. Running the full library test requires about 9M.
  37.  
  38. Comments/questions about the port should be directed to <e@flavors.com>.
  39.  
  40. Comments/questions about Moscow ML should probably be directed elsewhere, 
  41. as I am not an expert in ML or its implementation! Please read this file, 
  42. and any other README or documentation that accompanies this release 
  43. before sending questions to me or any of the other authors, mailing lists, 
  44. or newsgroups. See the SML FAQ, and  newsgroup comp.lang.ml which I watch 
  45. via the SML-LIST mailing list.
  46.  
  47. Getting Started
  48. ---------------
  49.  
  50. Extract the files onto your hard disk. The self extracting archive should 
  51. create a mosml folder. Inside this folder are the application archives, the 
  52. ppc applications and shared libraries, the mosml image, and library files.
  53.  
  54. The PPC version of mosml-mac is now supplied as a pair of files: a shared 
  55. library containing the bulk of mosml with the user interface, and a small (16k
  56. byte) application. The two files must be in the same folder, or else the shared 
  57. library must in the Extensions folder in your System Folder.
  58.  
  59. There is a second pair of PPC application and shared library for the creation 
  60. of mosml based CGIs. So in total there are four PPC specific files:
  61.  
  62. mosml142app       - the mosml application
  63. mosml142app.lib   - its shared library
  64. mosml142cgi       - the cgi application
  65. mosml142cgi.lib   - its shared library
  66.  
  67. In the application archive mosml142m68.sea there are two 68k applications:
  68.  
  69. mosml142m68       - the mosml application
  70. mosml142m68cgi    - the cgi application
  71.  
  72. I've distributed the 68k applications as self extracting archives because 
  73. having more than one set on the machine causes the Finder grief. if you have 
  74. a 68k based Mac, trash the four PPC files and double click on the application 
  75. archive mosml142m68.sea and select the mosml (default) folder for the target 
  76. of the extraction.
  77.  
  78. Each of the above sets, PPC and 68k, provide the same capabilities except that
  79. the first PPC set only runs on PowerMacs, and runs faster on PowerMacs than 
  80. the 68k set. Keep the version for your Mac and trash the other version. 
  81. From now on I'll call the version you kept "mosml" and "mosml-cgi."
  82.  
  83. The binary image file "mosml.image" is loaded automatically when mosml is 
  84. launched. mosml then loads some library files. It's important to avoid 
  85. moving the image or library files; they should be left where installed 
  86. (relative to mosml and the mosml folder).
  87.  
  88. Now you are running mosml interactively. Typing expressions, followed by 
  89. the Enter key (or Option-Return), causes the expression to be sent to 
  90. mosml for evaluation. Try typing:
  91.   help "lib";
  92. followed by Enter.
  93.  
  94. The Command menu contains mosml specific commands. Use these menu items 
  95. to use, load, compile, etc. The meaning of these commands is documented 
  96. in the Moscow ML documentation. The File, Edit, Search, and Windows menus 
  97. are for using the built in editor. Also in the Edit menu is a Styles item 
  98. for setting preferences (which are recorded in a "Mosml Preferences" file 
  99. in your Preferences Folder).
  100.  
  101. Later you can use the link function to build your own images. If you name 
  102. your image "mosml.image" then it will be loaded automatically at launch 
  103. instead of the original mosml image. You can also select an image to load 
  104. at launch time using the command line, via drag and drop, or through naming 
  105. conventions for applications and images; see below.
  106.  
  107. Also below is a section called eConsole User Notes which describes how to 
  108. use the console and editor features. Here are some newer features specific 
  109. to the mosml version of eConsole...
  110.  
  111. A command in the Search menu, Open Selection, can be used to open a file 
  112. by selecting its name in any window and typing Command-D. This can also 
  113. be used with mosml's error messages; in this case  the file that caused the 
  114. error will be opened, and the error text scrolled-to and highlighted. For 
  115. example, selecting the line:
  116. File "errortest.sml", line 3-6, characters 4-75:
  117. and typing Command-D (or selecting the Open Selection menu item) will open 
  118. the file errortest.sml in an edit buffer with the four lines highlighted.
  119. This only works for files in the current directory, but this is almost always 
  120. where files will be if the compiler is complaining about them.
  121.  
  122. The Console remembers the end point of the last input (plus Mosml's
  123. response, if any) and refuses to allow backspacing past that point. It
  124. beeps in response. A common new-user problem occurs when typing an 
  125. expression without a trailing semicolon -- it results in no response; 
  126. a natural reaction is to backspace to the previous line, add the semicolon, 
  127. and type Enter again (rather then simply typing the semicolon and Enter). 
  128. Unfortunately, this results in the expression being entered twice since the 
  129. rule is that all text in the "run" near or behind the insert point is sent 
  130. when Enter is typed. By preventing you from backing up to connect two text 
  131. "runs" the problem is avoided. You can still use Cut or Clear to remove 
  132. text from the Console window, if desired.
  133.  
  134. There is a Command menu item called End of Input. It is intended to emulate 
  135. the Control-D in UNIX. Using the End of Input command, or its command key 
  136. equivalent <Command-;> (that's the Command key and Semicolon) from toplevel 
  137. will cause Mosml to quit. Using the End of Input command while awaiting 
  138. input will cause any typed characters to be Entered, and then whatever 
  139. characters are available to be returned, even if there are none or fewer 
  140. than requested.
  141.  
  142. Cow Icons
  143. ---------
  144.  
  145. My nine (now almost eleven) year old daughter, Megan, drew the icons. She is 
  146. better at it than me. I chose a cow for the icon for three reasons:
  147. 1) "cow" are the letters missing from mosml
  148. 2) Caml Light uses a camel, so I though an animal face would be appropriate
  149. 3) I think cows are nice.
  150.  
  151. Cows in New Hampshire look _something_ like the icon. They are white with 
  152. blotchy black spots. If there are any Moscow ML users out there who are also 
  153. artists, please feel free to contribute more polished icons!
  154.  
  155. Launching, AppleScript, CGI
  156. ---------------------------
  157.  
  158. Mosml-mac has many new features related to AppleScript, AppleEvents, and the 
  159. creation of CGI applications. CGIs are created by duplicating the mosml-cgi
  160. application and giving it and an image file appropriate names. Other tools can 
  161. be created by duplicating and renaming the mosml application, and optionally 
  162. using AppleScript to customize startup behavior. (All this application 
  163. duplicating is why mosml is now implemented as a shared library!)
  164.  
  165. In the interest of saving bits on your disk, I will not duplicate the 
  166. description of these capabilities here. See the sections 
  167. - image pathname heuristic
  168. - cgi support
  169. - new environment variables
  170. - AppleScript library module
  171. - AppleEvent «event miscdosc»
  172. in the file MacReleaseNotes.txt, and examples in the folder e_SML.
  173.  
  174. Command Lines
  175. -------------
  176.  
  177. [Command lines are very non-Mac. You don't need to use them unless you 
  178. need to use mosmllex, or are bootstrapping a new version.]
  179.  
  180. If mosml cannot find the image file, or if the command key is held down 
  181. when mosml is launched, then mosml will display a single question mark 
  182. and await a command line. [The command key is the one with an apple or
  183. a "freeway interchange" symbol on it.]
  184.  
  185. The Moscow ML documentation describes command lines. The command line 
  186. options are specific to the image loaded. The general format is: 
  187.   <image-name> <command-line-options>
  188.  
  189. Examples:
  190.  
  191. :mosml.image -stdlib Bang:mosml:src:mosmllib:
  192. :mosml.image -stdlib Bang:mosml:src:mosmllib: -P full
  193. :mosmllex.image :src:toolssrc:Deplex.lex
  194.  
  195. Note: when specifying -stdlib, or -I include paths, it is best to provide 
  196. complete pathnames. A relative name for the image is fine since generally 
  197. it will go unused after the image is loaded, but paths are recorded 
  198. verbatim and become useless as soon as chDir() is executed.
  199.  
  200. When launched with the command key down, mosml will type the command line 
  201. it would have executed had no keys been held down. This can be copied and 
  202. pasted into the mosml console to customize the startup, e.g., add "-P full" 
  203. or "-P none" after the typed command line to change the set of library files 
  204. initially loaded. See the Moscow ML documentation for these sets.
  205.  
  206. WARNING: The command line parser will barf at pathnames with spaces in them. 
  207. The entire path from the root to the image file, and to stdlib, should only 
  208. contain volumes and directories without spaces (or returns!) in their names.
  209. [Actually, if you surround the pathname with quotes ('name with space' or 
  210. "name' with space") it should work OK.]
  211.  
  212. Library Status
  213. --------------
  214.  
  215. Although much of it is UNIX derived, a surprising amount of the library 
  216. now works with the Mac. In particular, walking directory structures, and 
  217. getting information about files, elapsed/used time, time of day, and dates 
  218. are all working. In fact, as of this release, the Mac version is ahead of 
  219. the DOS and UNIX versions in capability. In particular, the Mac version:
  220. - has the mosmldep capability built into a new make function
  221. - has the linker integrated into the toplevel environment.
  222.  
  223. One compromise was necessary in Path.sml -- it assumes that the pathname 
  224. string can be used to determine if a path is relative to the current 
  225. working directory or absolute (relative to "root"). While it is always the 
  226. case that Mac pathnames starting with ":" are relative, all other pathnames 
  227. can be relative or absolute. The Mac tries its darndest to find the file 
  228. somewhere. So, I made the following choice: if the name starts with a ":" 
  229. then it's relative, else if it contains a ":" it's absolute, else it's 
  230. relative. This seems to handle common cases (i.e., it's rare to store files 
  231. at root level). Path.sml also has assumptions built in about how pathname 
  232. arcs "." and ".." behave. These are just file (or directory) names on the 
  233. Mac. The Mac approach of "::" meaning up versus ":" meaning down is very 
  234. dissimilar to the UNIX approach; I tried to make Path.sml work as best I 
  235. could. It should do the right thing in most cases, certainly all common and 
  236. canonical cases.
  237.  
  238. There are also some differences in how file system links work. Mac aliases 
  239. are not 100% like UNIX links. For example, readLink() returns the absolute 
  240. pathname of the original file on the Mac.
  241.  
  242. The Mac implementation of readDir shares a bug with some other mosml
  243. implementations: if you modify the contents of a directory while it is 
  244. open for reading, the results are unpredictable.
  245.  
  246. Configuration
  247. -------------
  248.  
  249. mosml remembers your Styles preferences in a Preferences Folder file.
  250.  
  251. [You need to understand Mac resources and ResEdit for the rest of the 
  252. Configuration section to make sense. Don't worry, you don't need to 
  253. know any of this to use mosml.]
  254.  
  255. The Mac version of mosml simulates UNIX environment variables with 
  256. resources of type 'ENV '. The resource number doesn't matter, the 
  257. resources are identified by name. The format of an 'ENV ' resource is 
  258. simply a C string. mosml only looks for one 'ENV ' variable called 
  259. CAMLRUNPARAM. It is used to configure the memory manager. I don't know 
  260. where it's documented (probably the Caml Light distribution). A sensible 
  261. value for this string is provided as an 'ENV ' resource in the mosml 
  262. application. If the resource is not found, another sensible value is used.
  263.  
  264. You may add 'ENV ' resources to the mosml application (or to the system, 
  265. although I wouldn't recommend it) and they can be read using the function 
  266. Process.getEnv; here's an example...
  267.  
  268. - load "Process.uo";
  269. > val it = () : unit
  270. - Process.getEnv "VERSION";
  271. > val it = SOME "mosml 1.42e" : string option
  272.  
  273. There is also a 'STR#' resource in the mosml application called 
  274. econfigstrs. The five strings in this string list are used to form the 
  275. default command line and console window title. They are:
  276.  
  277. - image name              :mosml.image   [*]
  278. - stdlib relative path    :lib:          [*]
  279. - optional                -P
  280. - optional                default
  281. - console name            Mosml Console
  282.  
  283. When mosml uses the default command line, it converts the stdlib relative 
  284. path and the image name (marked with [*]) to absolute pathnames before 
  285. passing them to the image.
  286.  
  287. The image name in econfigstrs is used only if
  288. (a) no image was dragged and dropped onto mosml to launch it
  289.     (in which case the dropped image would be used)
  290. (b) the application name does not end in ".app" AND
  291.     no image was found in the application's directory with the same name as 
  292.     the application, but with ".app" replaced by ".image"
  293.     (in which case that image is used)
  294.  
  295. Mac toplevel
  296. ------------
  297.  
  298. The mosml toplevel environment on the Macintosh is extended from the 
  299. UNIX/DOS version. There are four new names:
  300.  
  301. make           -- see below
  302. link           -- see below
  303. moolevel       -- see below
  304. getDir         -- same as FileSys.getDir
  305.  
  306. The first three are documented below. The last one, getDir is used by the 
  307. Command menu.
  308.  
  309. The make and link functions can be used to build complete mosml applications 
  310. without any other tools, i.e., without a UNIX shell or make program. 
  311. Together with mosmllex and mosmlyac, make and link can be used to bootstrap 
  312. mosml. [If you start from the UNIX distribution you will also need perl, 
  313. e.g., MacPerl, and you may need to preprocess some files with the C 
  314. preprocessor or by hand -- the Mac source distribution has these files 
  315. included "pre-processed."]
  316.  
  317. make
  318. ----
  319.  
  320. The make command compiles all files in a directory needing recompilation. 
  321. It has all the compile capabilities of mosmlc, plus it finds dependencies 
  322. among the files. It only compiles what needs to be compiled.
  323.  
  324. make : string -> string -> string list -> string -> unit
  325.  
  326. Evaluating:
  327.  
  328.   make <oset> <stdlib> [<dir1>..<dirN>] <path>
  329.  
  330. is equivalent to running mosmlc as follows:
  331.  
  332.   mosmlc -P <oset> -stdlib <stdlib> -I <dir1> ..  -I <dirN> <files...>
  333.  
  334. where <files...> is a subset of the files in directory <path> determined by 
  335. tracing out the dependencies among the files and their need for compilation.
  336.  
  337. The make command uses the mosmldeps parser to find dependencies for all 
  338. files in a directory, computes the transitive closure of these dependencies, 
  339. finds a consistent ordering for the files, tests each file in turn to see if 
  340. it needs compilation (including tests upon modification times of units 
  341. outside the target directory as long as they're visible to find_in_path()), 
  342. and compiles the files if necessary. It takes as arguments -stdlib and -I 
  343. paths and -P so it can be used to compile the library and compiler 
  344. directories.
  345.  
  346. A file needs compilation if:
  347.    1- there is no corresponding object file, "object"
  348.    2- the mtime of the object is older than the epoch
  349.    3- the mtime of the source is newer than mtime of the object
  350.    4- the mtime of any dependency is newer than the mtime of the object
  351. where the epoch is a built in time variable, currently Time.zeroTime.
  352.  
  353. Make keeps a cache of file dependencies; when run a second or subsequent 
  354. time the cache is consulted and verified based on the mtime of the source 
  355. file. This can save considerable time. If you ever need to flush this 
  356. cache (although I can't think of why you would) see moolevel below.
  357.  
  358. Caveats: make doesn't know about cpp, yacc, lex, sed, awk, perl, etc. It 
  359. does report when it finds ".grm" files without corresponding ".sig" and 
  360. ".sml" files, for example, (and the same for .mlp & .lex) but these must be 
  361. made manually. I have created a mosmlyac-mac which I have used to compile 
  362. the .grm files, and as I said above, mosml can run mosmllex with the command 
  363. line, and I have used this technique to compile the .lex files.
  364.  
  365. moolevel
  366. --------
  367.  
  368. moolevel : int ref
  369.  
  370. moolevel controls the verbosity of make.
  371.  
  372. 0: no messages
  373. 1: error messages
  374. 2: compile messages
  375. 3: progress messages
  376.  
  377. It defaults to 1, but I personally like level 2.
  378.  
  379. As a special hack, if moolevel is negative, then it is negated, and the 
  380. cache of file dependencies is cleared. You should never need this.
  381.  
  382. link
  383. ----
  384.  
  385. link : string -> bool * bool -> bool * string -> string  \
  386.               -> string list -> string list -> unit
  387.  
  388. link is the link portion of mosmlc.
  389.  
  390. Evaluating:
  391.  
  392.   link <file> (<g>,<h>) (<a>,<oset>) <stdlib>
  393.           [<dir1>..<dirN>] [<file1>..<fileN>]
  394.  
  395. is equivalent to running mosmllnk as follows
  396.  
  397.   mosmllnk -o <file> {-g} {-noheader} {-noautolink} -P <oset> -stdlib <stdlib> \
  398.            -I <dir1> ..  -I <dirN> <file1>..<fileN>
  399.  
  400. where -g is included if <g> is true,
  401.       -noheader is included if <h> is true, and
  402.       -noautolink is included if <a> is false.
  403.  
  404. If <oset> is "" then it is replaced by "default"
  405.  
  406. If <a> is true then link does the following:
  407. 0- <oset> is ignored, use "" or any string
  408. 1- trace out all load dependencies of <file1>..<fileN>
  409. 2- include in the list of files to be linked all other files depended upon
  410.    if they can be found in any of the specified paths
  411. 3- construct a legal link order for the files
  412. 4- then link this list as usual
  413.  
  414. Typically, simply specifying your Main program to be linked will find all 
  415. the required .uo files and put them in the right order.
  416.  
  417. Examples
  418. --------
  419.  
  420. To create a new mosml project, put all the source files in a new directory, 
  421. "project." Don't put any incomplete or irrelevant sources in the same 
  422. directory or they will be compiled, too. Assuming your project only depends 
  423. on library files, evaluate:
  424.  
  425. let val base = "pathname of the mosml directory:"
  426. in
  427.   make "full" (base ^ "lib") [] (base ^ "project")
  428. end;
  429.  
  430. to compile all your files. Evaluate this each time you have made changes in 
  431. your sources to keep the object files up to date.
  432.  
  433. Here is a sample make and link script to build mosml.image:
  434.  
  435. (* ********************************** *)
  436.  
  437. load "Path";
  438. load "Process";
  439.  
  440. val home =
  441.   case Process.getEnv "PATH_TRANSLATED" of
  442.     SOME n => Path.dir n
  443.   | NONE => ":"
  444. ;
  445.  
  446. moolevel := 2;
  447.  
  448. (* to compile the toplevel mosml image and the lexer *)
  449.  
  450. let val base = home ^ "src:"
  451. in
  452.   valuepoly := false;
  453.   make "none" (base ^ "mosmllib") [] (base ^ "mosmllib");
  454.   valuepoly := true;
  455.   make "none" (base ^ "mosmllib") [] (base ^ "compiler");
  456.   make "none" (base ^ "mosmllib") [(base ^ "compiler")] (base ^ "toolssrc");
  457.   make "none" (base ^ "mosmllib") [(base ^ "compiler")] (base ^ "lex")
  458. end;
  459.  
  460. (* to build the toplevel mosml image into file "testtop.image" *)
  461.  
  462. let val base = home ^ "src:"
  463. in
  464.   chDir base; chDir "::";
  465.   link "testtop.image"
  466.        (true,true) (* -g -noheader *)
  467.        (true,"")   (* -autolink -P *)
  468.        (base ^ "mosmllib") [(base ^ "compiler"),(base ^ "toolssrc")]
  469.        ["Maine.uo"]
  470. end;
  471.  
  472. (* ********************************** *)
  473.  
  474. eConsole User Notes
  475. -------------------
  476.  
  477. 1. Interacting with the interpreter
  478.  
  479. Interaction with the interpreter's read-eval-print (REP) loop is done 
  480. inside the "Mosml Console" window. The contents of the interaction window 
  481. can be edited by the user. This window also acts as the default standard 
  482. output port (and input port). Consequently, the interpreter sends its 
  483. output to the interaction window. User input and system output are 
  484. displayed with different fonts. By default, user input is in bold face 
  485. (but this and other attributes of the window can be changed with the 
  486. "Styles..." item in the Edit menu).
  487.  
  488. Normally, the user types an expression and then "sends" it to the 
  489. interpreter to be evaluated. The result of the evaluation is then output 
  490. to the interaction window. The preferred way of evaluating an expression 
  491. is to place the insertion point (caret) immediately after the expression 
  492. to evaluate and then typing the <enter> key. An alternative method is to 
  493. use the <opt-return> (i.e. press the <return> key while pressing the 
  494. <option> key). When <enter> is pressed, the sequence of "user input" 
  495. characters immediately preceding the insertion point are sent to the 
  496. interpreter. Because it doesn't check for a properly formed expression, 
  497. the <enter> key is useful for programs doing text oriented input. Arbitrary 
  498. text can also be sent to the interpreter by selecting the text and typing 
  499. <opt-return> or <enter>.
  500.  
  501. These interaction mechanisms also work from windows associated to files 
  502. (i.e., in an edit buffer). However, the result of evaluation is always 
  503. displayed in the interaction window.
  504.  
  505. 2. Basic editing
  506.  
  507. It is assumed that you are familiar with standard Macintosh editing 
  508. techniques. If not, you should consult your Getting Started disks and 
  509. Macintosh users' manuals.
  510.  
  511. On all keyboards the following keys are defined:
  512.  
  513.     delete - erase character before cursor position
  514.        tab - indent current line
  515.     return - insert a new line and move to the left margin (and then
  516.              do a <tab> if autoindent is selected for the window)
  517. opt-return - send the expression preceding the insertion point
  518.      enter - send the user input preceding the insertion point
  519.  
  520. 3. Special keys
  521.  
  522. On extended keyboards the following special keys are supported:
  523.  
  524.    F1 - F4 - equivalent to Undo, Cut, Copy and Paste
  525.   F5 - F15 - function keys (not used)
  526.       del> - erase character after the insertion point
  527.       home - scroll text to the top of the edit buffer
  528.        end - scroll text to the bottom of the edit buffer
  529.    page up - scroll text up a page
  530.  page down - scroll text down a page
  531.  
  532. Note that these last four do not move the insertion point, just scroll.
  533.  
  534. 4. Arrow keys
  535.  
  536. Arrow keys (when available) move the insertion point in the corresponding 
  537. direction:
  538.  
  539.       left - move cursor to the left one character
  540.      right - move cursor to the right one character
  541.         up - move cursor up one line
  542.       down - move cursor down one line
  543.  
  544. Arrow keys can be modified with the <shift>, <option>, and <command> keys.
  545.  
  546. The <shift> key may be used to extend the text selection per Apple 
  547. standards. Each selection has an anchor end and an active end. Generally, 
  548. the active end is the last end you moved, the anchor end doesn't move. When 
  549. the <shift> key is held down, the selection's active end is moved by the 
  550. arrow keys.
  551.  
  552. The <option> key may be used with the arrow keys to move the insertion 
  553. point left or right by word, or up or down by page. <Shift> and <option> 
  554. together may be used to move the active end of the selection left or right 
  555. by words, or up or down by pages.
  556.  
  557. The <command> key may be used with the arrow keys to move the insertion 
  558. point left or right to the beginning or end of the line, or up or down to 
  559. the beginning or end of the text. <Shift> and <command> together may be 
  560. used to move the active end of the selection to start or end of the line 
  561. or text.
  562.  
  563. When <shift>, <option>, and <command> are held down together, the up or 
  564. left arrow will make the beginning of the selection the active end, and the 
  565. down or right arrow will make the end of the selection the active end.
  566.  
  567.  
  568. 5. Emacs commands
  569.  
  570. [Sorry, with this version most Emacs commands are absent.]
  571.  
  572. A small subset of Emacs compatible command keys are supported by the editor.
  573. Some of these commands make use of the <control> key.
  574.  
  575. The following table lists the Emacs compatible command keys using the 
  576. following abbreviations:
  577.   C = <control> key, M = <option> key (Emacs' "meta" key).
  578.  
  579. Commands which move the insertion point:
  580.  
  581.   C-f      - forward character
  582.   C-M-f    - forward S-expression
  583.   C-b      - backward character
  584.   C-M-b    - backward S-expression
  585.   C-a      - beginning of line
  586.   C-M-a    - beginning of S-expression
  587.   C-m      - select enclosing S-expression
  588.   C-M-m    - select enclosing S-expression
  589.   C-e      - end of line
  590.   C-M-e    - end of S-expression
  591.   C-p      - previous line
  592.   C-n      - next line
  593.  
  594. Commands which modify the buffer:
  595.  
  596.   C-d      - delete forward (same as del> key)
  597.   C-del>   - delete to end of line
  598.   C-k      - same as C-del>
  599.   C-o      - open line
  600.  
  601. Other commands:   M-return - same as <opt-return>
  602.  
  603. 6. Mouse
  604.  
  605. The editing action is specified by the number of mouse button clicks:
  606.  
  607.     single - position insertion point
  608.     double - select word
  609.     triple - select line
  610.  
  611. Dragging after one of these clicks extends the selection by character, word,
  612. or line respectively; the anchor point is the original click position, the 
  613. active end is the other end of the selection. After a click-drag, the 
  614. active end can be moved with <shift> clicks or <shift> arrow keys. The 
  615. anchor and active ends of the selection can be swapped with
  616. <option+shift+click>, or <option+shift+command> up/down or left/right arrow 
  617. keys.
  618.  
  619.  
  620. 7. Scrolling
  621.  
  622. Holding down <command>, <shift>, <option>, and <control> keys speeds up 
  623. scrolling when mousing in the arrows of the scroll bar. The more keys you 
  624. hold down the faster it scrolls (exponentially). Live scrolling is also 
  625. supported: grab the scrollbar's "thumb" indicator and drag it around; the
  626. text will follow.
  627.  
  628.  
  629. 8. Editor limitations
  630.  
  631. The text size is limited by memory space. There is a limit of 32,000 lines 
  632. (not characters) per window. The editor has been used with files several 
  633. hundred kilobytes in size.
  634.  
  635. Credits: Thanks to Marc Feeley for contributing to the eConsole User Notes.
  636.  
  637.